package com.mrjy.queries.bo;

import java.nio.file.Files;
import java.util.List;

import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import com.mrjy.common.dto.MyMessagesDto;
import com.mrjy.common.entity.QuestionComment;
import com.mrjy.common.entity.QuestionInfo;
import com.mrjy.common.entity.RecordInfo;
import com.mrjy.common.entity.UserInfo;
import com.mrjy.queries.dto.PayQuestionCommentParamDTO;

public interface IQuestionCommentBo {
	
	/**
	 * 分页查询评论
	 * @param comment
	 * @param userInfo
	 * @return
	 */
	List<QuestionComment> queryComments(QuestionComment comment,UserInfo userInfo);
	/**
	 * 评论问题
	 * @param comment
	 * @param userInfo
	 * @return
	 */
	String doComment(QuestionComment comment,UserInfo userInfo);
	/**
	 * 通过userId查询评论列表
	 * @param info
	 * @return
	 */
	public Object queryCommentListByUserId(QuestionInfo info);
	/**
	 * 通过questionId查询一级评论数
	 * @param info
	 * @return
	 */
	public Object selectCommentByQuestionId(QuestionComment info);
	/**
	 * 增加评论
	 * @param userId 评论人id
	 * @param questionId 问题id
	 * @param commentedId 被评论id
	 * @param commentContent 评论内容
	 * @param quoteCommentId 二级评论记录id
     * @param recordInfo
     * @return
     */
    public Object txToComment(QuestionComment qComment, RecordInfo recordInfo);

    /**
     * 通过quoteCommentId查询二级评论
	 * @param info
	 * @return
	 */
	public Object selectSecondCommentByQuoteCommentId(QuestionComment info);
	/**
	 * 通过id查询记录
	 * @param id
	 * @return
	 */
	public Object queryById(Integer id);
	
	Object queryPageCommentsOrderByNum(QuestionComment comment);

    Object queryMyQAPageByUserId(QuestionComment comment, HttpSession session);

    public Object queryMyMessagesPageByCommentedId(MyMessagesDto dto);

    public Object txUpdateReadFlagToReaded(Integer id);
	
	Object queryCommentByQid(QuestionComment comment);
	
	Object txUpdateById(QuestionComment comment, HttpSession session);
	
	Object txUpdateDisableFlag(QuestionComment comment, UserInfo userInfo);
	
	Object selectQuestionCommentListPage(QuestionComment info, HttpSession session);
//	Object queryPageCommentsHot(QuestionComment comment);
	Object queryPageCommentsHot(QuestionComment comment, HttpSession session);

    Object queryPageCommentWithRecord(QuestionComment info);

    Object listenRecord(QuestionComment info);

    Object querySumGoodNumByUserId(QuestionComment info, HttpSession session);

    Object queryTeacherCommentInfoByQidUid(QuestionComment info);

    Object queryDeserveToListen(QuestionComment comment);

    public Object addCommentNum(Integer id);
	Object exportExl(QuestionComment info, HttpServletResponse response, HttpSession session);

    Object queryPageTopicCommentsHot(QuestionComment comment, HttpSession session);
	Object drawConsultant(QuestionComment comment, HttpSession session);
	Object drawHome(QuestionComment comment, HttpSession session);

    Object quesyNewTextComment(QuestionInfo info);
	Object queryFirstCommentNumByQuestionId(Integer questionId);
	Object queryQuesctionContentByTypeIds();
	/**
	 * 查询付费回答
	 * @param dto
	 * @return
	 */
	Object queryPayQuestionComment(PayQuestionCommentParamDTO dto);
	
	Object queryCountPayQuestionComment(PayQuestionCommentParamDTO dto);
}
